﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<_3Sixty.Maverick.Models.Thread>" %>
<%@ Import Namespace="_3Sixty.Maverick.Models" %>
<!DOCTYPE html>

<html lang="en">
    
    <head>
        <title><%= Model.Title %></title>
        <meta charset="utf-8" />
        <link type="text/css" rel="stylesheet" href="#" />
        <!--[if lt IE 9]>
            <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    </head>
    
    <body>

        <header>
            <h1><%= Model.Title %></h1>
        </header>

        <% foreach (Message message in Model.Messages) { %>
                <article id="post<%= Model.ThreadID %>">
                    <%= message.Text %>
                    <footer>
                        <cite>
                            <%= message.Author %>
                        </cite>
                        <time datetime="<%= message.DateCreated %>" pubdate="pubdate"><%= message.DateCreated %></time>
                    </footer>
                </article>
        <% } %>
        
        <% using(Html.BeginForm("Post", "Thread")) { %>
        <p>Name: <%= Html.TextBox("Author") %></p>
        <p>Message: <%= Html.TextBox("Text") %></p>
        <p><input type="submit" value="Post" /></p>
        <%= Html.ValidationSummary("Message!") %>
        <% } %>
        
</body>
</html>
